home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1986 January & February / rerun-1986-01-02.d64 / pulsing pics 64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  153 lines

  1. 100 rem pulsing pictures for c-64
  2. 110 rem george trepal   2650 alturas rd
  3. 120 rem bartow fl  33830
  4. 130 :
  5. 140 poke 52,32:poke56,32:poke650,128:dimts(39),tc(39):goto560
  6. 150 rem synthetic cursor
  7. 160 print"[147]";
  8. 170 cd=54272:h=214:l=211
  9. 180 p=1024+peek(h)*40+peek(l)+(peek(l)>39)*40
  10. 190 ch=peek(p):k=128
  11. 200 pokep,((ch+k)and255):pokep+cd,peek(646)
  12. 210 poke 53272,(peek(53272)and240)+x
  13. 220 ifz$="\"thenpoke53272,(peek(53272)and240)+4:end
  14. 230 x=x+2: if x=16 then x=8
  15. 240 getz$:ifz$=""then200
  16. 250 pokep,ch:printz$;
  17. 260 ifz$=chr$(34)thenpoke212,0
  18. 270 ifz$="[148]"thenpoke216,0
  19. 280 ifz$="[133]"then320
  20. 290 ifz$="[136]"then450
  21. 300 goto180
  22. 310 rem save screen
  23. 320 forj=0to39:ts(j)=peek(1024+j):tc(j)=peek(55296+j):poke(1024+j),32:next
  24. 330 input"program name";pn$
  25. 340 ifpn$=""then330
  26. 350 pn$=pn$+",s,w"
  27. 360 forj=0to39:pokej+1024,ts(j):poke(j+55296),tc(j):next
  28. 370 open8,8,8,pn$
  29. 380 gosub1580
  30. 390 forj=1024to2023:vl=peek(j):print#8,vl
  31. 400 next
  32. 410 forj=55296to56295:vl=peek(j):print#8,vl
  33. 420 next:close8:close15
  34. 430 goto170
  35. 440 rem load screen
  36. 450 input"[147]program name";pn$
  37. 460 ifpn$=""then450
  38. 470 pn$=pn$+",s,r"
  39. 480 open8,8,8,pn$
  40. 490 gosub1580
  41. 500 forj=1024to2023:input#8,vl:pokej,vl
  42. 510 next
  43. 520 forj=55296to56295:input#8,vl:pokej,vl
  44. 530 next:close8:close15
  45. 540 goto170
  46. 550 rem move character set
  47. 560 poke 53280,12: poke 53281,0: poke 646,13
  48. 570 print"[147]":printspc(12)"pulsing pictures"
  49. 580 printspc(12)"by george trepal"
  50. 590 printspc(6)"the characters that move are:"
  51. 600 printspc(9)"unshifted 1 through 9"
  52. 610 printspc(11)"shifted 6  7  8  9"
  53. 620 printspc(6)"and unshifted ,  .  *  +  /  -"
  54. 630 printspc(6)"the \ sign ends the program."
  55. 640 printspc(6)"f1 saves the screen to disk"
  56. 650 printspc(6)"f7 loads a screen from disk"
  57. 660 printspc(6)"[150][211][153]patience is a virtue - wait"
  58. 670 printspc(9)"moving character sets"
  59. 680 j=53248: k=8192: l=10240: m=12288: n=14336
  60. 690 poke56334,peek(56334)and254:rem interrupt off
  61. 700 poke 1,peek(1) and 251: rem i/o out
  62. 710 fori=0to2023:p=peek(i+j)
  63. 720 poke i+k,p: poke i+l,p: poke i+m,p: poke i+n,p
  64. 730 next
  65. 740 poke 1,peek(1) or 4: rem i/o in
  66. 750 poke 56334,peek(56334) or 1: rem interrupt on
  67. 760 rem install custom characters
  68. 770 j=8495
  69. 780 printspc(6)"installing custom characters"
  70. 790 j=j+1:read x:if x<0 then810
  71. 800 poke j,x: goto790
  72. 810 if j<10000 then j=10543: goto790
  73. 820 if j<12000 then j=12591: goto790
  74. 830 if j<14000 then j=14639: goto790
  75. 840 print"[147]  press the space bar to go on or any"
  76. 850 print"  other key to change background color"
  77. 860 geta$:ifa$=""then860
  78. 870 ifa$<>" "thenpoke53281,(cland15):cl=cl+1:goto860
  79. 880 x=8:goto160
  80. 890 data0,126,126,96,96,126,126,0,24,60
  81. 900 data102,195,129,24,60,102,24,36,66,129
  82. 910 data24,36,66,129,102,60,24,0,195,102
  83. 920 data60,24,129,66,36,24,129,66,36,24
  84. 930 data255,255,0,0,0,255,255,0,255,0
  85. 940 data0,0,255,0,0,0,255,255,0,0
  86. 950 data0,255,255,0,255,0,0,0,255,0
  87. 960 data0,0,255,129,129,129,129,129,129,255
  88. 970 data0,0,0,24,24,0,0,0,192,129
  89. 980 data3,6,12,24,48,96,3,129,192,96
  90. 990 data48,24,12,6,192,192,192,192,192,192
  91. 1000 data192,192,3,3,3,3,3,3,3,3
  92. 1010 data255,255,0,0,0,0,255,255,195,195
  93. 1020 data195,195,195,195,195,195,135,36,48,4
  94. 1030 data108,104,0,49,0,0,0,0,15,15
  95. 1040 data15,15,204,204,51,51,204,204,51,51
  96. 1050 data -1
  97. 1060 data0,126,126,102,102,102,102,0,60,102
  98. 1070 data195,129,24,60,102,195,36,66,129,24
  99. 1080 data36,66,129,24,195,102,60,24,0,195
  100. 1090 data102,60,24,129,66,36,24,129,66,36
  101. 1100 data255,0,0,0,255,255,0,0,0,0
  102. 1110 data0,255,0,0,0,255,0,255,255,0
  103. 1120 data0,0,255,255,0,255,0,0,0,255
  104. 1130 data0,0,0,126,66,66,66,66,126,0
  105. 1140 data0,0,60,36,36,60,0,0,3,6
  106. 1150 data12,24,48,96,193,131,192,96,48,24
  107. 1160 data12,6,131,193,48,48,48,48,48,48
  108. 1170 data48,48,12,12,12,12,12,12,12,12
  109. 1180 data0,255,255,0,0,255,255,0,102,102
  110. 1190 data102,102,102,102,102,102,192,196,28,80
  111. 1200 data0,103,37,32,0,0,0,0,240,240
  112. 1210 data240,240,102,102,153,153,102,102,153,153
  113. 1220 data -1
  114. 1230 data0,126,126,6,6,126,126,0,102,195
  115. 1240 data0,24,60,102,195,24,66,129,24,36
  116. 1250 data66,129,24,36,24,195,102,60,24,0
  117. 1260 data195,102,36,24,129,66,36,24,129,66
  118. 1270 data0,0,0,255,255,0,0,0,0,0
  119. 1280 data255,0,0,0,255,0,0,255,255,0
  120. 1290 data0,0,0,255,0,0,255,0,0,0
  121. 1300 data255,0,0,0,60,36,36,60,0,0
  122. 1310 data0,126,66,66,66,66,126,0,12,24
  123. 1320 data48,96,192,129,3,6,48,24,12,6
  124. 1330 data3,129,192,96,12,12,12,12,12,12
  125. 1340 data12,12,48,48,48,48,48,48,48,48
  126. 1350 data0,0,0,255,255,0,0,0,24,24
  127. 1360 data24,24,24,24,24,24,0,143,160,162
  128. 1370 data2,42,200,3,240,240,240,240,0,0
  129. 1380 data0,0,51,51,204,204,51,51,204,204
  130. 1390 data -1
  131. 1400 data0,102,102,102,102,126,126,0,195,0
  132. 1410 data24,60,102,195,24,60,129,24,36,66
  133. 1420 data129,24,36,66,60,24,195,102,60,24
  134. 1430 data0,195,66,36,152,129,66,36,24,129
  135. 1440 data0,0,255,255,0,0,0,255,0,255
  136. 1450 data0,0,0,255,0,0,0,0,255,255
  137. 1460 data0,0,0,0,0,0,0,255,0,0
  138. 1470 data0,255,0,0,0,24,24,0,0,0
  139. 1480 data255,129,129,129,129,129,129,255,48,96
  140. 1490 data192,129,3,6,12,24,12,6,3,129
  141. 1500 data192,96,48,24,3,3,3,3,3,3
  142. 1510 data3,3,192,192,192,192,192,192,192,192
  143. 1520 data0,255,255,0,0,255,255,0,54,54
  144. 1530 data54,54,54,54,54,54,3,121,0,215
  145. 1540 data16,244,6,48,15,15,15,15,0,0
  146. 1550 data0,0,102,102,153,153,102,102,153,153
  147. 1560 data -1
  148. 1570 ren error trap
  149. 1580 open15,8,15
  150. 1590 input#15,e,e$
  151. 1600 ife=0thenreturn
  152. 1610 printe,e$:close8:close15:end
  153.